Skip to content

MMRL X Theme Migration#69

Draft
DerGoogler wants to merge 87 commits into
masterfrom
threading-marge
Draft

MMRL X Theme Migration#69
DerGoogler wants to merge 87 commits into
masterfrom
threading-marge

Conversation

@DerGoogler

Copy link
Copy Markdown
Contributor

No description provided.

Add Module, ModulePaths and ModuleState data types and migrate UI and viewmodel to use them. Refactor ModulesViewModel into an AndroidViewModel with separated source/sorted/filtered flows, root/non-root loaders, and a RootCallable-based banner loader; implement disk-based scanning (listModules/toModule) to read module.prop and state files. Update ModuleList/ModuleItem UI to consume the new model, load banners via RootCallable, and adapt various interactions (remove, indicators, previews).

Build and infra updates: switch APK naming to androidComponents, add packaging excludes for release, add runtime dependency for RootThread, bump AGP/Kotlin/Hilt/KSP versions in libs.versions.toml, change datastore namespace, and set android.disallowKotlinSourceSets=false. Also fix convention plugins to use newer Kotlin Gradle APIs (compilerOptions.optIn) and tidy plugin application. Minor utility additions: Context.getNonRootBaseDir and addRootThread calls in BaseActivity/MainActivity.
Remove decorative section separators, explanatory comments and a few docblocks from ModulesViewModel.kt to reduce clutter. No functional changes were made — all flows, functions and logic (comparators, loaders, search, etc.) remain intact; only comments and some whitespace were removed for readability.
Update module list/item UI and viewmodel wiring, and add helper functions for root-thread file I/O.

- ModuleItem: remove debug log, use module.paths.adbDir and toModId to launch WebUI via context.launchWebUIX with WebUIActivity; import related extensions.
- ModuleList / ModulesScreen: remove isProviderAlive parameter/prop from list/item flows and simplify RemoveButton usage by providing a default enabled value.
- ModulesViewModel: simplify platform observation (remove coroutine/onEach flow handling) and remove the isProviderAlive getter; minor cleanup of comments.
- Extensions: add root-thread helpers (rootSync, RootCallable.sync) and File.inputStream0 that performs file reads on the root thread.

These changes consolidate WebUI launch logic, reduce extraneous state passing, and introduce safe root-thread file access utilities.
Introduce dev.mmrlx UI library and refactor module screens and models to use it. Key changes:

- build: add dependencies dev.mmrlx:ui and dev.mmrlx:nio; keep thread dependency.
- Model: make Module properties non-nullable (name, version, versionCode, author, description).
- New file: add commented SearchToolbar stub.
- MainScreen: replace Material NavigationBar/Scaffold usage with dev.mmrlx Scaffold/BottomNavigation, use ProvideLocalScaffoldScope and scaffoldHazeSource for nav host padding.
- ModuleItem: rewrite layout to use dev.mmrlx components (AppAvatar, AppSeparator, ProvideTextStyle, card, Text/theme) simplify click handling to launch WebUI, remove many legacy imports and commented code, show size/version in new footer row.
- ModuleList: change signature to ScaffoldScope.ModulesList, adjust contentPadding to account for scaffold paddings, wire with LocalScaffoldScope; vertical scrollbar usage commented out.
- ModulesScreen: switch to dev.mmrlx Toolbar/Scaffold, inline ModulesList call, simplify loading/empty-state logic and comment out PullToRefresh.
- BaseActivity: wrap MMRLAppTheme with MMRLXTheme and import theme.
- settings.gradle.kts: add mavenLocal and optional GitHub Packages maven repository using GPR credentials from gradle properties or env vars.

These changes migrate UI pieces to the mmrlx design system, simplify layouts, and prepare repo resolution for mmrlx artifacts.
Introduce status bar contrast detection and safer activity/context handling across the WebUI stack.

- Add webui/src/main/assets/ext/statusbar.js to measure top-of-page luminance and call window.webui.updateStatusBarIconTint.
- Implement ApplicationInterface.updateStatusBarIconTint to toggle status bar icon tinting via WindowInsetsControllerCompat.
- Make KernelSUInterface.fullScreen use context.findActivity() and the activity window when changing system UI.
- Harden HybridWebUI activity discovery and lifecycle: validate activity state, cache application context, provide safeApplicationContext/safeBaseContext accessors, add isActivitySafe, and clear cached context on detach/destroy.
- JavaScriptInterface now resolves context from view.safeApplicationContext.
- Add a mainThread helper to WXInterface to post to the main looper.
- Inject the statusbar script from WebrootPathHandler when auto status bar styling is enabled.

Also includes minor import cleanup and logging for robustness.
Introduce per-source WebConsoleStore (add source param and factory in HybridWebUIStore) so each JS interface can have its own console history. Add ConsoleEntry helpers (info/warn/error/debug/trace) and a private logLevel builder to normalize args into ResultNode.Primitive values. Add PrimitiveKind.parse companion to infer primitive kinds from Kotlin values. Update JavaScriptInterface to use buildConsoleStore, clear console logs on onDestroy (with @callsuper), and normalize several method signatures. Update WXInterface to find the Activity via context.findActivity, use consoleLogs.* helpers, and pass the resolved Activity into posted runnables. Misc: small formatting and minor null/flow safety adjustments.
Introduce a reusable BottomNavigation composable and wire it into ModulesScreen and SettingsScreen; remove the old inline BottomNav from MainScreen and simplify its nav host setup. Remove dependency on LocalScaffoldScope in ModuleList and adjust bottom padding. Refactor console handling across hwui and webui: use store.buildConsoleStore(TAG) / view.consoleLogs instead of direct consoleStore access, and replace manual fallback console entries with console.error(e). Bump dev.mmrlx:ui dependency to 1.0.8 and apply minor import/formatting cleanups.
Remove the local hwui module and migrate usage to the dev.mmrlx.hybridwebui/artifacts. Updated imports across the app to use dev.mmrlx.hybridwebui and adjusted code to new APIs (console, iife, interfaces). Register HybridWebUI event emitter and keyboard observer in WebUIActivity, add FileChooser from the new package, and enableOnBackInvokedCallback in the activity manifest. Bumped dev.mmrlx UI dependency (1.0.8 -> 1.0.9) and updated Compose/foundation versions and dependency metadata in libs.versions.toml. Refactored UI usages to match new compose API (icon/Text/IconButton imports, SearchableToolbar, input state handling, nestedScroll) and removed the projects.hwui dependency.
Migrate ModulesMenu to use rememberModalBottomSheet instead of a manual open state and BottomSheet. Convert MenuBottomSheet into a ColumnScope MenuBottomSheetContent that is provided to the modal sheet; IconButton now opens the sheet. Remove custom SegmentedButtonsDefaults styling and rely on the SegmentedButtons API. Add a reusable MenuChip composable implemented with FilterChip (including leading/trailing icons) and a small Point Canvas helper to draw the selection dot. Clean up imports and adapt to dev.mmrlx UI components.
Replace the withActivity block with a direct activity.exit(options) wrapped in a try/catch to prevent unhandled exceptions from crashing the app and to log failures via consoleLogs.error. Adds the dev.mmrlx.hybridwebui.store.error import used for logging. This ensures exit errors are reported instead of causing crashes.
Add an in-app WebUI implementation and developer tools plus related UI and platform integrations.

- Added WebUI X activity and support: new WebUIActivity, ExtraOptions, path handlers, platform helpers and utilities to register Su/Webroot/Internal handlers and read module config; included WebUI compose view and developer tools integration (DevTools, ConsoleTab, DOMTab, NetworkTab, ViewTab, TabRow, etc.).
- Added error-page.css asset for WebUI error page styling.
- Refactored modules UI to use LocalModule/State APIs (ModuleItem, ModuleList, ModulesScreen): support launching module WebUI via intent with module id/baseDir, combinedClickable for long-press to open file explorer, updated cover loading to use SuFile and provider state, switched view model list source to viewModel.local and enabled pull-to-refresh & provider alive flag.
- Manifest and build updates: added a dedicated WebUI activity entry (permissions/process/taskAffinity) and changed main activity intent-filter action/category; added mmrlx.utilities dependency in build.gradle.kts.
- Minor code cleanups: removed unused imports, switched some icons to painterResource, and adjusted imports/usages across several files.

These changes enable launching and inspecting module WebUIs inside the app and add a suite of devtools for debugging web content.
Introduce comprehensive SuFile read/write extensions (SuFileReadWrite.kt): buffered readers/writers, read/write text and bytes, streaming helpers (forEachBlock/forEachLine/useLines), and input/output stream constructors. Add a placeholder WebUI JavaScript interface (FileSystemInterface.kt) that currently throws UnsupportedOperationException pending a filesystem rework; commented stubs show intended API. Bump mmrlx version to 1.0.51 in libs.versions.toml. Remove redundant JSONObject opt* helper aliases from JSONCollectionExt.kt.
Introduce MD3 and MMRLX prompt/confirm composables and wire them into the Web UI interface. Adds two new alert components (app/src/.../alerts/Confirm.kt and Prompt.kt) and a new prompt ExportMethod in ApplicationInterface that shows themed overlays via activity.addOverlayView; confirm() was updated to use the new composables as well. Minor refactors: switched parameter map builders in WebUIActivity to use add(pair) calls, removed an obsolete onReceivedError override and unused imports in WebrootPathHandler, and bumped the mmrlx library version to 1.0.52.
Migrate internal list/toolbar APIs to the new dev.mmrlx compose UI library and modernize related screens.

- Replace legacy list components with dev.mmrlx equivalents (RadioDialogOption, RawItem, List, Section, InputDialogItem, SwitchItem, etc.) and update ListItems to use Modifier-based APIs and slots.
- Add NavigateUpToolbar composable for consistent up-navigation (overloads for NavController/Context/onBack).
- Update FeaturedManager to produce RadioDialogOption and remove old RadioOptionItem usage.
- Refactor DeveloperScreen and SettingsScreen to use mmrlx toolbar, list, dialogs and theme primitives; convert dialogs to rememberDialog/InputDialogItem and add a remote domain info dialog.
- Rename Separator usage in ModuleItem and adjust imports across UI files.
- Add new WebUIEngine value (MX) and related string resources (settings_webui_engine_mx, cancel/confirm/learn_more).
- Bump mmrlx dependency version in libs.versions.toml.

These changes migrate UI code to the mmrlx component APIs, simplify item composition with Modifier-based patterns, and introduce a shared NavigateUp toolbar. Review calling sites for API changes (dialog/item types and modifier helpers).
Migrate UI code to newer mmrlx components and APIs. ModuleItem: replace .card() with .flashlightCard() and update import. LicensesScreen: refactor to use dev.mmrlx scaffold/toolbar/list primitives (ToolbarDefaults/ToolbarScrollBehavior, Scaffold.toolbar/bottomBar, NavigateUpToolbar), move list rendering into a ScaffoldScope extension, replace custom Card/List DSL with List/RawItem, use Modifier.onClick for external links, FormatText+inline Icon for link hint, and Badges for version/license labels. Also add bottom navigation and adjust scaffold padding/content arrangement. Bump mmrlx version to 1.0.63.
Adjust module item click handling to launch the appropriate WebUI based on userPreferences.webuiEngine. The condition was changed to use canWenUIAccessed and imports updated to enable launchWebUIX. If the MX engine is selected, an Intent starts WebUIActivity; if WX is selected, launchWebUIX is used (with a TODO note to deprecate WX since devtools are unstable). The toast message was updated to "Unsupported engine". Also add a TODO comment in FileSystemInterface noting it's not yet implemented and requires a filesystem rework.
Introduce a new WebUIConfig property autoAddInsets (default false) and, when enabled, inject a small script in WebrootPathHandler that shifts the document by the top inset and adjusts the document height to account for top+bottom insets. This enables automatic layout adjustment for system/status bar insets in the web UI. Imports were slightly reorganized.
Refactors Md3Prompt and MXPrompt to improve keyboard handling and option parsing: make prompt composables internal, wire through imeAction and keyboardType, simplify confirm/close logic, and use rememberInputState with a custom layout for MXPrompt. Adds helper converters ImeAction.fromString and KeyboardType.fromString and updates ApplicationInterface to safely read option fields (defaultValue, supportingText, keyboardType, imeAction) via getAs/getByPathOrDefault. Also cleans up unused imports and adjusts dialog behavior. Bumps mmrlx version in gradle/libs.versions.toml.
Implement a FileSystem JavaScript interface for the WebUI: expose POSIX open flags, and add readFile/readFileSync/writeFile using SuFile/SuFileOutputStream with charset handling and PermissionParser for mode parsing. Register the interface in WebUIActivity and add a prefs-driven useConsoleInterceptor flag; DevTools now only show when enableDevTools is enabled. Add a Developer-screen switch, strings, ViewModel and datastore plumbing to persist disableConsoleInterceptor. Remove old SuFileReadWrite utilities and bump mmrlx/mmrl versions in libs.versions.toml. Includes helper PermissionParser utility and robust NIO text writing helpers.
Introduce a KernelSU JavaScript interface for the WebUI (KernelSUInterface) to provide exec/spawn/toast/fullscreen/moduleInfo and root-shell integration for web modules. Add a new WorkingMode enum in datastore with helpers (isRoot/isNonRoot/isSetup) and mapping to Platform. Wire the new working-mode APIs through the app: update imports to use com.dergoogler.mmrl.wx.datastore.model.WorkingMode, expose isRootMode to WebUI settings, register the KernelSUInterface in WebUIActivity, and pass the working-mode flag into the web module config. Also minor cleanups (unused imports, TODO comment in FileSystemInterface) and bump mmrlx dependency version.
Add a stableId property to RenderEntry and include an index for text nodes so each rendered item has a stable, unique key. buildRenderList now tracks text occurrences with a counter map to assign deterministic indices; LazyColumn items use stableId as the key to avoid UI reordering/jank. Also refactor JS runJs invocations and dialog/layout code for clearer string escaping and formatting, and remove some comment separators/whitespace for consistency.
Replace Material Icons usage with project drawable resources (ConsoleTab and NetworkTab) and remove now-unused imports. Add a temporary native BackHandler in WebUIActivity to consume webview back navigation (goBack or finish activity) and comment out the previous JS back-handler injection in WebrootPathHandler. Bump mmrlx version to 1.0.75 in libs.versions.toml. Minor import cleanup.
Add vector drawables (git_branch, git_commit) to app res and git_branch to webui res. Enhance ModuleItem: show module version with author, display size and last-updated timestamp using FormatText with inline icons, adjust paddings and divider usage, and clean up imports. Minor UI tweaks: reorder contentPadding call in ListItems.LinkButton and switch FormatText placeholders from %c to %y in DeveloperScreen and LicenseScreen. These changes improve module list readability and add visual git indicators.
DeveloperScreen: import and add BottomNavigation as the scaffold bottomBar, reorder scaffoldPadding to apply after scrolling/fill, and change FormatText placeholder from "%c" to "%y" for the beta badge. MainScreen: remove unused UI imports and the scaffoldHazeSource modifier usage to clean up the composable. Bump mmrlx dependency to 1.0.82 in libs.versions.toml to pick up upstream UI changes.
Register mmrlx webui Lua plugin and SU-backed file/stream factories, and update related APIs:

- Add mmrlx.webui.lua dependency and bump mmrlx version; add libs alias mmrlx-webui-lua.
- Register Input/OutputStream and File factories (SuFileInputStream, SuFileOutputStream, SuFile) so WebUI can access root-mode files.
- Register a Lua plugin pointing to the module's webroot index.lua and wire additional path/JS interfaces.
- Replace jsonObject extras with a typed extra map and use settings.extra<T>() accessors in ExtraOptions for safer typing.
- Replace usages of context with kontext in path handlers, interfaces, and error page rendering.

These changes enable loading Lua-based WebUI plugins and provide SU file I/O integration for root-mode operation.
Introduce a toolbar boolean parameter to ModuleScope (default true) and propagate it to ContentWrapper so the scaffold toolbar can be conditionally hidden. ContentWrapper now accepts toolbar and returns early from the Scaffold toolbar lambda when toolbar is false. Update WebUIActivity to call ModuleScope(moduleId, toolbar = false) to hide the toolbar for the WebUI screen. Also bump mmrlx dependency to 1.0.124 in libs.versions.toml.
Migrate devtools UI to the MMRLXTheme and dev.mmrlx compose primitives: replace MaterialTheme components (dividers, icons, text, surfaces) with dev.mmrlx equivalents and use MMRLXTheme colors/typography throughout. Introduce richer console color tokens (foreground/background pairs) and wire them into ConsoleTab (refactor ConsoleRow/Toolbar, LevelFilterChip API changes to use icon resource + fg/bg colors). Add MXExt.kt to provide badge color tokens (error/warn/info/debug) and Oklch-based color helpers. Other updates: adjust TabRow to support endContent and layout measurement for right-aligned content, refine DOMTab syntax colors, tweaks to indicator/backgrounds/typography, and various small layout/color fixes to unify the look with the new theme.
Add Jsoup dependency and switch DOM handling from JSON serialization to stamping the document with data-devtools-id and dumping HTML, then parsing it with Jsoup. Introduce jsoupId on DomNode, parseElement and unwrapJsString helpers to build nodes and text entries (trimming/limiting text), and update all runJs calls to query by the stamped data-devtools-id. Refactor render list construction and ancestor-collapse logic, handle text nodes correctly, and apply various UI/layout cleanups and minor formatting improvements.
Introduce legacy JavaScript interfaces (ModuleInterface, FileInputInterface, FileOutputInterface) and register them in WebUIScreen to maintain backwards compatibility. Expose file input/output stream wrappers to JS and use an append flag when creating SuFileOutputStream. Add various WebUI helpers: deprecated warning, runTry utilities, module sanitized id helpers, and propagate WorkingMode through WebUISettings (workingMode). Add ApplicationInterface methods to return current manager/application info and extend WorkingMode with a readable toString and cleaned up isRoot logic.
Remove the getCurrentApplication method and its PackageInfoCompat import from ApplicationInterface, eliminating the exposed package/version JSON helper. In WebUIScreen, replace the verbose WorkingMode->String when-block with a direct prefs.workingMode.toString and remove the now-unused WorkingMode import to simplify user-agent/platform string construction.
Replace explicit applicationId values for testing flavors (internal/alpha/beta/rc) with applicationIdSuffix to follow suffix convention. Remove versionNameSuffix entries for release and debug build types. Add extraction of the testing flavor and update the APK output filename template to include the buildType and flavor. The previous packaging exclusion for release variants was also removed.
@juliazero

Copy link
Copy Markdown
Contributor

WebUI X / MX engine doesn't show icons and app names. Compassion with KsuWebUIStandalone

Screenshot_20260601-095101_KsuWebUI Screenshot_20260601-095114_WebUI X

When back button behavior is controlled by JavaScript, it's impossible to exit from any WebUI.
Native control is working.


Add shortcut doesn't work

@DerGoogler

Copy link
Copy Markdown
Contributor Author

The package manager is not implemented in MX. I might implement it via Lua to give developers max flexibility to adjust it themselves.

The JavaScript back interceptor needs to be supported and implemented by the module developer. A note might be good too to mention that it needs to be implemented by the developer.

Shortcuts have been disabled due to two engines that needs to be supported and somehow opened bases on the user settings.

Introduce a standalone FileExplorer feature and base-path handling.

- Add FileExplorerActivity with splash handling and a Destinations nav host using a new FileExplorerGraph.
- Move file explorer/editor screens into com.dergoogler.mmrl.wx.ui.screens.fileexplorer and update @destination annotations and navigation targets.
- Add BasePathScope, LocalBasePath composition local, and Module.rememberBasePath + ModuleUIState.ReadyBasePath to resolve ADB base path (with error/loading states).
- Update FileExplorerScreen/FileEditorScreen to use BasePathScope and initialize the ViewModel using SuFile(basePath, "modules").
- Update ModuleScope/ModuleItem to consume base path and remove previous module long-click navigation behavior.
- Update AndroidManifest: register FileExplorerActivity, adjust MainActivity launchMode/taskAffinity/window settings and intent filters.
- Build: collapse flavorDimensions to only "distribution" (remove "testing").

Also include small import and composable-state fixes and several file renames to reflect the new package layout.
Replace FileExplorerActivity's icon/label and add adaptive/vector drawables. The manifest now uses @mipmap/launcher_explorer and updates the label from "Explorer" to "WX Explorer". New resources: a vector file icon (res/drawable/files.xml), a scaled foreground vector for the adaptive icon (res/drawable/launcher_explorer_foreground.xml), and an adaptive icon XML (res/mipmap-anydpi-v26/launcher_explorer.xml) that references the app launcher background. No behavior changes beyond the UI/branding update.
Replace the old ConfigEditor implementation with a new compose UI surface: use ModuleScope/LocalModule, NavigateUpToolbar, and dev.mmrlx.compose UI list components (InputDialogItem, RadioDialogItem, SwitchItem, etc.) instead of the previous custom list components. Add descriptive text for interceptor options and update string resources accordingly. Change WebrootConfig.refreshInterceptor default to "native" and restrict refresh-interceptor options for pull-to-refresh. Misc: simplify backInterceptor logic, preserve existing config bindings, and update toolbar/navigation behavior.
FileExplorer: only initialize on first load by checking state.currentPath in the composable LaunchedEffect to avoid re-initialization when returning from other screens.

ViewModel: wrap initialize() in a coroutine and reset transient messages (isLoading, errorMessage, successMessage) before calling loadFiles. Add defensive null checks for currentPath in navigation methods and surface user-facing errorMessage when navigation/back operations are invalid (e.g. null current path or empty history). These changes prevent NPEs and provide clearer feedback on navigation failures.
Bump mmrlx dependency to 1.0.130 and update code to match its API renames and behavior changes. Replace old interface/import locations (ExportMethod/ExportVariable annotations, JavaScriptInterface/PureJavaScriptInterface, PathHandler) and adjust related imports across multiple webui interfaces and path handlers. Update ConsoleTab JSON parsing to use ResultNode.parseJsonObject, add supervisorScope import, and other small refactors. Modify app build config to add versionNameSuffix for release/debug and change output APK naming to include distribution flavor. Add QUERY_ALL_PACKAGES permission to main manifest and add a playstore-specific manifest that removes that permission. Several minor formatting and import reorganizations to align with the updated library.
Add WebUI package utilities and icon path handler so the web UI can list installed apps and serve app icons (ksu://icon). Expose two JS interfaces (listPackages and getPackagesInfo) in KernelSUInterface to return package lists and metadata. Update WebUIScreen to whitelist the ksu scheme, register the new IconPathHandler and adjust InternalPathHandler registration ordering. Fix SuPathHandler constructor to use url instead of authority. Bump mmrlx dependency to 1.0.133.
Move WebrootPathHandler registration to after InternalPathHandler setup to change handler precedence and ensure internal path mappings are applied first. Also clean up imports in InternalPathHandler.kt (remove duplicate/reordered PathHandler import).
Introduce DEFAULT_CSP in WebrootConfig and use ContentSecurityPolicyManager in WebrootPathHandler to merge the configured CSP with the default (and resolve {domain} via baseUri). Replace manual string-replace logic with mergedCsp for response headers (fallback and HTML responses). Also bump mmrlx dependency to 1.0.135. This centralizes CSP handling and avoids duplicated replacement code.
Expose username and token inputs in the build-apk action and write gpr.user/gpr.key into gradle.properties (ensuring a trailing newline) so Gradle can authenticate to private packages. Update release CI to pass ACTOR and GH_TOKEN secrets to the action. Also bump mmrlx to 1.0.136 and correct module coordinates for mmrlx-webui-core/lua (webui-core -> webui.core, webui-lua -> webui.lua).
Add support for reading module metadata from ZIPs and wire the importer into the ModulesViewModel.

- Add Module.fromZip(...) to extract module properties from a ZIP entry (uses ZipFile).
- Replace PlatformManager/LocalModule usage in ModuleImporter with Module and ModulesViewModel: importer now accepts a viewModel, uses viewModel.adbPath to determine base path, checks existing modules via viewModel.findById, and calls viewModel.refreshModules() after a successful import.
- Update ModulesScreen to pass the viewModel to ModuleImporter.
- Add adbPath property and findById helper to ModulesViewModel to expose the current AdbPath and lookup by id.

Also adjust target directory resolution (baseDir.baseDir) and remove the old PlatformManager-based parsing logic.
Add a debug log for the merged content-security-policy in WebrootPathHandler to aid debugging. Normalize and correct spacing/terminator in DEFAULT_CSP in WebrootConfig (ensure connect-src ends with semicolon). Bump mmrlx dependency version to 1.0.137.
Add WebrootConfig to Module and prefer webroot files for banners/icons by introducing relativeModuleOrWebrootDir. Update Module property lookup to fall back to webrootConfig values when alias keys are missing. Make Module.Empty a getter to avoid a shared instance. Update ModuleItem to use the new Avatar component with a painter from module.icon and add the necessary toPainter import. Bump mmrlx dependency version to 1.0.138.
Broaden CSP and fix package selection logic.

- WebrootConfig.kt: Change img-src from "ksu://icon" to "ksu:" so the CSP permits ksu scheme URIs more generally.
- PackageManager.kt: Invert the BuildConfig.IS_GOOGLE_PLAY_BUILD condition so launchable apps are returned for Google Play builds (previously returned for non-Play builds), correcting app listing behavior.
Moves the `SuFile.toPainter()` composable into app utilities and updates `ModuleItem` to use it. The helper decodes the file into a remembered bitmap painter based on the file path and modification time.
Introduces a new DevTools Snippets tab with quick actions (border all elements, refresh page, full WebUI reload, and editable page mode). Adds a Hilt-backed `DevToolsViewModel` and `LocalDevTools` composition local to persist snippet state, wires a recompose trigger into `WebUIActivity` for full WebUI reloads, and reorganizes existing DevTools tabs under a dedicated `devtools.tabs` package. Also adds the new `snippets` string resource and bumps the mmrlx dependency version.
Implement vertical drag gestures to allow users to resize the DevTools panel. Added height state management with min/max constraints, and updated the DevToolsContainer to accept dynamic panel height. The drag handle now receives the gesture modifier to enable resizing.
Introduce a dedicated shortcut creation flow for modules, including custom name, icon selection, engine choice, and pinned shortcut creation. The shortcut entry point moves from the module list into the config editor, and the Gradle config now registers generated KSP sources per variant so the new destination code is picked up correctly.
Re-enabled navigation to the App Theme settings screen and updated that screen to use the shared MMRLX scaffold/toolbar and theme primitives. Added a reusable `Alert` component with info/warning/debug/error variants, and surfaced an informational banner on the App Theme page. Theme-related setting items were also refactored away from Material3-specific styling to MMRLX components/colors for more consistent UI behavior.
Simplify `ViewTab` by removing `WindowInsets.statusBars` usage and the top padding applied to `DevToolsTabRow`. This drops now-unused inset imports and keeps the tab row background styling unchanged.
Add a new WebUI JavaScript `Module` interface (`mod`) that exports core module fields (id, name, author, version, description) plus adb/module path data for frontend access. To support this, `AdbPath` and `ModulePath` now provide `toJSONObject()` helpers, and the interface is registered in `WebUIScreen`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants